﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace MvcTricks.RoundTripModelBinding.TestWebsite.ViewModels
{
    public class ShoppingBasketViewModel
    {

        public List<OrderLineViewModel> OrderLines { get; set; }
        public double Total
        {
            get
            {
                var total = 0.0d;
                foreach (var line in OrderLines)
                    total += line.Total;
                return total;
            }
        }

    }
}